import {Component} from '@angular/core';
import {NavController, NavParams} from 'ionic-angular';

/*
 Generated class for the Site page.

 See http://ionicframework.com/docs/v2/components/#navigation for more info on
 Ionic pages and navigation.
 */
@Component({
  selector: 'page-site',
  templateUrl: 'site.html'
})
export class SitePage {
  items: Array<{ title: string, note: string, icon: string, url: string }>;
  icons: string[];

  constructor(public navCtrl: NavController, public navParams: NavParams) {
    this.icons = ['flask', 'wifi', 'beer', 'football', 'basketball', 'paper-plane',
      'american-football', 'boat', 'bluetooth', 'build'];
    this.items = [
      {
        title: '九九漫画',
        note: '九九漫画',
        icon: this.icons[Math.floor(Math.random() * this.icons.length)],
        url: 'http://ssoonn.com'
      },
      {
        title: '看漫画',
        note: '看漫画',
        icon: this.icons[Math.floor(Math.random() * this.icons.length)],
        url: 'http://www.ikanman.com/'
      },
      {
        title: '爱漫画',
        note: '爱漫画',
        icon: this.icons[Math.floor(Math.random() * this.icons.length)],
        url: 'http://2manhua.com'
      },
      {
        title: '汗汗漫画',
        note: '汗汗漫画',
        icon: this.icons[Math.floor(Math.random() * this.icons.length)],
        url: 'http://www.hhxiee.cc'
      },
      {
        title: '蕾丝猫',
        note: '蕾丝猫',
        icon: this.icons[Math.floor(Math.random() * this.icons.length)],
        url: 'http://www.lesmao.com/'
      },
      {
        title: '吹雪漫画',
        note: '吹雪漫画',
        icon: this.icons[Math.floor(Math.random() * this.icons.length)],
        url: 'http://www.chuiyao.com/'
      },
      {
        title: 'CC图库',
        note: 'CC图库',
        icon: this.icons[Math.floor(Math.random() * this.icons.length)],
        url: 'http://www.tuku.cc'
      },
      {
        title: 'CC图库',
        note: 'CC图库',
        icon: this.icons[Math.floor(Math.random() * this.icons.length)],
        url: 'http://www.tuku.cc'
      },
      {
        title: 'CC图库',
        note: 'CC图库',
        icon: this.icons[Math.floor(Math.random() * this.icons.length)],
        url: 'http://www.tuku.cc'
      },
      {
        title: 'CC图库',
        note: 'CC图库',
        icon: this.icons[Math.floor(Math.random() * this.icons.length)],
        url: 'http://www.tuku.cc'
      },
    ]
  }

  itemTapped(event, item) {
    window.location.href = item.url;
  }

}
